{% extends 'wxchat/wxbase.html' %}{% load static %}
{% block container %}
<div class="page">
    {% include "shopping/include/myheader.html" %}
    <div class="page_body">
        <div class="weui-panel weui-panel_access margin_top2">
            <div class="weui-tab" id="navbar">
            <div class="weui-navbar">
                <div class="weui-navbar__item weui-bar__item_on"><i class="icon iconfont icon-youhuiquan" ></i>食品消费</div>
                <div class="weui-navbar__item"><i class="icon iconfont icon-icon5" ></i>寄养消费</div>
            </div>
            <div class="weui-tab__panel">
                <!--食品消费开始-->
                <div class="weui-tab__content">
                    <div class="weui-cells cells_top cell-before">
                        {% for order in orders %}
                        <div class="weui-cell">
                            <div class="weui-cell__hd"><span class="weui-badge badge badge-bgcolor" >{{ forloop.counter }}</span></div>
                            <div class="weui-cell__bd"><p class="center"><B>{{ order.cash_fee|default:0.00 }}</B>元</p></div>
                            <div class="weui-cell__ft">{{ order.pay_time|date:'Y-m-d H:i'}}</div>
                        </div>
                        {% empty %}
                        <div class="weui-cell cell-end">
                            <div class="weui-cell__bd" >
                               <p class="center">( ⊙ o ⊙ ) 啊哦，没有食品消费记录哦</p>
                            </div>
                        </div>
                        {% endfor %}
                         <div class="weui-cell cell-end">
                            <div class="weui-cell__bd" >
                               <p class="center">( ⊙ o ⊙ ) 啊哦，没有更多食品消费记录喽</p>
                            </div>
                        </div>
                    </div>
                </div>
                <!--食品消费结束-->
                <!--寄养消费开始-->
                <div class="weui-tab__content">
                   <div class="weui-cells cells_top cell-before">
                   {% for foster_order in fosterOrders %}
                          <div class="weui-cell">
                            <div class="weui-cell__hd"><span class="weui-badge badge badge-bgcolor" >{{ forloop.counter }}</span></div>
                            <div class="weui-cell__bd"><p class="center"><B>{{ foster_order.cash_fee|default:0.00 }}</B>元</p></div>
                            <div class="weui-cell__ft">{{ foster_order.pay_time|date:'Y-m-d H:i'}}</div>
                          </div>
{#                          <div class="weui-cell">#}
{#                            <div class="weui-cell__hd">订单号:</div>#}
{#                            <div class="weui-cell__bd"><p>{{ order.out_trade_no }}</p></div>#}
{#                          </div>#}
                    {% empty %}
                        <div class="weui-cell cell-end">
                             <div class="weui-cell__bd" >
                               <p class="center">( ⊙ o ⊙ ) 啊哦，没有消费记录哦</p>
                            </div>
                        </div>
                    {% endfor %}
                     <div class="weui-cell cell-end">
                            <div class="weui-cell__bd" >
                               <p class="center">( ⊙ o ⊙ ) 啊哦，没有更多的消费记录喽</p>
                            </div>
                     </div>
                  </div>
                <!--寄养消费结束-->
            </div>
        </div>
        </div>
    </div>
</div>
{% endblock container %}
{% block bottomjs %}
    {{ block.super }}
    <script type="application/javascript">

    $(function(){
        defIndex = sessionStorage.getItem('myrecharge');

        weui.tab('#navbar',{
            defaultIndex: defIndex ==null?0:defIndex,
            onChange: function(index){
                sessionStorage.setItem('myrecharge',index);
            }
        });

    });

    </script>
{% endblock bottomjs %}